<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path= request.getContextPath();
	System.out.print(path);
	String basePath = request.getScheme() + "://"    + request.getServerName() + ":" + request.getServerPort()    + path + "/";
%>
<link rel="stylesheet" type="text/css" href="<%=path %>/pages/admin/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=path %>/pages/admin/easyui/themes/icon.css">
<script type="text/javascript" src="<%=path %>/pages/admin/easyui/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/pages/admin/easyui/jquery.easyui.min.js"></script>
<div id="p"    
        style="width:900px;height:500px;padding:10px;background:#fafafa;" > 
<s:form namespace="/pages" method="post">
	<s:hidden name="id" value="%{page.result[actionName].id}"></s:hidden>
	<p>
		<label>姓名:&nbsp;&nbsp;</label>
		<s:textfield name="name" value="%{page.result[actionName].name}"></s:textfield>
		<s:fielderror> 
    	<s:param>username </s:param> 
		</s:fielderror>
	</p>
	<p>
		<label>用户名:</label>
		<s:textfield name="username" value="%{page.result[actionName].username}"></s:textfield>
	</p>
	<p>
		<label>密码:&nbsp;&nbsp;</label>
		<s:textfield name="password" value="%{page.result[actionName].password}"></s:textfield>
	</p>
	<p>
		<label>所属角色：</label>
		<input id="cc" class="easyui-combobox" name="dept"  
    data-options="valueField:'id',textField:'name',url:'/pages/admin/Role!json.do'">
	</p>

	<s:if test="%{page.result[actionName]==null}">
		<s:submit value="保存" action="%{actionName}!save" namespace="/pages" />
	</s:if>
	<s:else>
		<s:submit value="修改" action="%{actionName}!update" namespace="/pages" />
	</s:else>
</s:form>
</div>
